<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<div style="width:500px; margin:0px auto;">
  <h3 style="width:500px; margin:0px auto; text-align:center">添加书籍</h3>
  		<form action="AddBookServlet" method="post"  enctype="multipart/form-data">
        <table width="500" border="1">
          
          <tr>
            <td align="left">图书名称</td>
            <td align="left"><input type="text" name="bookName" id="bookName" /></td>
          </tr>
          <tr>
            <td align="left">图书分类</td>
            <td align="left">
            <select name="typeId" id="typeId">
            	<c:if test="${typeList!=null}">
            		<c:forEach items="${typeList}" var="bookType">
            			<option value="${bookType.typeID}">${bookType.typeName}</option>
            		</c:forEach>
            	
            	</c:if>
           
          </select>          
             </td>
          </tr>
         <tr>
            <td align="left">上传图片</td>
            <td align="left"><input type="file" name="file"></td>
          </tr>
          
          <tr>
            <td height="49" colspan="2" align="center" valign="middle"><label>
              <input type="submit" name="btnAdd" id="btnAdd" value="添加" />
              <input type="reset" name="btnCancel" id="btnCancel" value="取消" />
            </label></td>
          </tr>
        </table>
        </form>
  </div>
</body>
</html>